package com.cinyi.ormlite.web.dcp;

import java.sql.Connection;

/**
 * 连接提供对象
 * @author penghui
 *
 */
public interface IConnectionProvider {
	public static final String DEFAULT_SCHEMA = "default" ;
	
    public static final String CP_C3P0 = "c3p0" ;
    public static final String CP_DRUID = "druid" ;
    public static final String CP_JIVE = "jive" ;
    public static final String CP_HIKARI = "hikari" ;
    
    /**
     * jdbc url
     * @return String
     */
	String getJDBCUrl();
	
	/**
	 * 获取数据库连接
	 * @return Connection
	 */
	Connection getConnection();
	
	/**
	 * 启用连接生成器
	 */
	void onStart();
	
	/**
	 * 注销连接生成器
	 */
	void onDestroy();
}
